<?php
	$user_id = Yii::app()->user->getId();
	//Get notification
	$notification['news'] = NotificationController::viewListNotification($user_id);
	echo "<li><strong>Thông báo : </strong></li>";
	foreach ($notification['news'] as $news)
	{
		if($news['read'] == 0){
			echo '<li style="background: #999;">';
		}else{
			echo "<li>";
		}
		?>
		    <div style="float: left; clear: left; padding: 3px;height:50px;">
		      	<?php
		      	echo '<a href="'.$news['link'].'">';
		      	echo '<img src="'.Yii::app()->request->baseUrl.'/themes/fly_high/assets/img/avatar/'.$news['thumbnail'].'" width="50px"/>';
		      	?>
		      </div>
		      <div style="height:50px;">
			    <?php
			    	echo "<strong>".$news['content']."</strong>";
					echo '</a><br/>'.$news['posttime'];
			    ?>
		      </div>

		</li>
		<?php
	}
?>
<script type="text/javascript">
	var quantityNotificationNewsUnRead = <?php echo NotificationController::getQuantityUnread($user_id);?>;
</script>